<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$title}</title>
<link href="__PUBLIC__/static/home/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="__PUBLIC__/static/home/css/style.css" type="text/css" rel="stylesheet">
<link type="text/css" href="__PUBLIC__/static/home/css/nprogress.css" rel="stylesheet">
<?php if(F('webSet')['miku']==1):?>
<link type="text/css" href="__PUBLIC__/static/home/miku/miku.css" rel="stylesheet">
<link type="text/css" href="__PUBLIC__/static/home/miku/chat.css" rel="stylesheet">
<meta name="baidu-site-verification" content="MM2Ez6rLA8" />
<?php endif;?>
</style>
<!--[if lt IE 9]>
    <script src="__PUBLIC__/static/home/js/html5shiv.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/static/home/js/respond.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/static/home/js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
<link rel="apple-touch-icon-precomposed" href="__PUBLIC__/static/home/images/icon/favicon.ico">
<link rel="shortcut icon" href="__PUBLIC__/static/home/images/icon/favicon.ico">
<block name='css'></block>
<meta name="Keywords" content="{:F('webSet')['keywords']}" />
<meta name="description" content="{:F('webSet')['web_description']}" />
</head>

<body>
<?php if(F('webSet')['miku']==1):?>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content winchat">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">和小凡聊天</h4>
            </div>
            <div class="modal-body">
              <div id="container">  
                  <ul class="contentsasa">
                    <li><img class="imgleft" src="/Public/static/home/images/timg.gif"><span class="spanleft">么么哒(｡･ω･｡)！你可以问我今天天气，最近上映的电影，讲笑话，找妹子图片，近期新闻，甚至包括菜谱，等等......快来试试吧~</span></li>
                  </ul>
                  <div class="footermiku">  
                  <form class="form-inline" id="chatmsg1212">
                    <div class="form-group">
                      <input type="text" id="text" style="width: 390px;border-radius: 5px;" class="form-control" id="name" placeholder="请输入消息">
                    </div>
                    <button type="button" class="btn btn-success" onclick="send()" id="btn">发送</button>
                  </form>
                  </div>  
              </div>  
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<?php endif;?>
<section class="container user-select">
  <header>
    <div class="hidden-xs header"><!--超小屏幕不显示-->
      <h1 class="logo"> <a href="{:U('index/index')}" title="个人技术博客"></a> </h1>
      <ul class="nav hidden-xs-nav">
        <li class="active"><a href="{:U('index')}"><span class="glyphicon glyphicon-home"></span>网站首页</a></li>
        <foreach name='menus' item='m'>
        <li><a href="{$m['url']}"><span class="{$m['icon_class']}"></span>{$m['name']}</a></li>
        </foreach>
        <li><a href="{:U('index/messagewall')}"><span class="glyphicon glyphicon-erase"></span>留言墙</a></li>
        <li><a href="{:U('index/links')}"><span class="glyphicon glyphicon-link"></span>友情链接</a></li>
        <li><a href="{:U('index/tags')}"><span class="glyphicon glyphicon-tags"></span>本站标签</a></li>
        <li><a href="{:U('index/about')}"><span class="glyphicon glyphicon-user"></span>关于作者</a></li>
      </ul>
      <div class="feeds" style="text-align: center;padding: 0;background-color: #f6f6f6;border-bottom:none">
      <?php if(F('webSet')['miku']==1):?>
      <div id="miku" class="miku">
        <div id="messages">加载中……</div>
        <div id="mumu" class="mumu"></div>
      </div>
      <?php endif;?>
      </div>
    </div>
    <!--/超小屏幕不显示-->

    <div class="visible-xs header-xs"><!--超小屏幕可见-->
      <div class="navbar-header header-xs-logo">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-xs-menu" aria-expanded="false" aria-controls="navbar"><span class="glyphicon glyphicon-menu-hamburger"></span></button>
      </div>
      <div id="header-xs-menu" class="navbar-collapse collapse">
        <ul class="nav navbar-nav header-xs-nav">
          <li class="active"><a href="{:U('index')}"><span class="glyphicon glyphicon-home"></span>网站首页</a></li>
          <foreach name='menus' item='m'>
        <li><a href="{$m['url']}"><span class="{$m['icon_class']}"></span>{$m['name']}</a></li>
        </foreach>
          <li><a href="{:U('index/messagewall')}"><span class="glyphicon glyphicon-erase"></span>留言墙</a></li>
          <li><a href="{:U('index/links')}"><span class="glyphicon glyphicon-link"></span>友情链接</a></li>
          <li><a href="{:U('index/tags')}"><span class="glyphicon glyphicon-tags"></span>本站标签</a></li>
          <li><a href="{:U('index/about')}"><span class="glyphicon glyphicon-user"></span>关于作者</a></li>
        </ul>
        <form class="navbar-form" action="{:U('index/articles')}" method="get" style="padding:0 25px;">
          <div class="input-group">
            <input type="text" class="form-control" name="title" placeholder="请输入关键字" value="{:I('get.title')}">
            <span class="input-group-btn">
            <button class="btn btn-default btn-search" type="submit">搜索</button>
            </span> </div>
        </form>
      </div>
    </div>
  </header>
  <!--/超小屏幕可见-->
  <block name="content"></block>
<style>
.sentence{
transition: 2s;
-webkit-transition:2s;
}
.sentence:hover{
-webkit-transform: rotateY(360deg); /* Chrome, Safari, Opera */
    transform: rotateY(360deg);
}
</style>
<aside class="sidebar visible-lg"><!--右侧>992px显示-->
    <div class="sentence"> <strong>每日一句</strong>
      <h2><?php echo date('Y年m月d日');?> 
        <?php
            $da = date("w"); 
            if( $da == "1" ){ 
              echo "星期一"; 
            }else if( $da == "2" ){ 
              echo "星期二"; 
            }else if( $da == "3" ){ 
              echo "星期三"; 
            }else if( $da == "4" ){ 
             echo "星期四"; 
            }else if( $da == "5" ){ 
              echo "星期五"; 
            }else if( $da == "6" ){ 
              echo "星期六"; 
            }else if( $da == "0" ){ 
              echo "星期日"; 
            }
        ?>
      </h2>
      <p>{$translation}</p>
    </div>
    <div id="search" class="sidebar-block search" role="search">
      <h2 class="title"><strong>搜索</strong></h2>
      <form class="navbar-form" id="searchForm" action="{:U('index/articles')}" method="get">
        <div class="input-group">
          <input type="text" class="form-control" size="35" id="titleInput" name="title" placeholder="请输入关键字" value="{:I('get.title')}">
          <span class="input-group-btn">
          <button class="btn btn-default btn-search" type="submit" id='search'>搜索</button>
          </span>
          </div>
      </form>
    </div>
    <div class="sidebar-block recommend">
      <h2 class="title"><strong>{:color_txt('热门推荐')}</strong></h2>
      <ul>
      <foreach name='hotArticle' item='ha'>
        <li><a target="_blank" href="{:U('index/article/id/'.$ha['id'])}"> <span class="thumb"><img <empty name='ha.cover'>src='__PUBLIC__/static/admin/i/1.jpg'<else />  src="
          <?php
              if(file_exists('.'.$ha['cover'])){
                echo $ha['cover'];
              }else{
                echo "__PUBLIC__/static/admin/i/1.jpg";
              }
            ;?>
        "</empty> alt="{$ha['title']}"></span> <span class="text">{$ha['title']} ...</span> <span class="text-muted">阅读({$ha['views']})</span></a></li>
        </foreach>
      </ul>
    </div>

  <div class="sidebar-block">
      <h2 class="title"><strong>{:color_txt('文章分类')}</strong></h2>
      <div style="text-align: center;">
      <foreach name='categories' item='ca'>
      <a type="button" class="btn btn-info tagssss" href="{:U('index/articles/cid/'.$ca['id'])}" data-toggle="tooltip" data-original-title="查看关于 {$ca['category']} 的文章">{$ca['category']}</a>
        </foreach>
        </div>
    </div>

    <div class="sidebar-block">
      <h2 class="title"><strong>{:color_txt('文章归档')}</strong></h2>
      <div style="text-align: center;">
      <foreach name='archives' item='ar'>
      <a type="button" class="btn btn-info tagssss" href="{:U('index/articles/month/'.$ar['month'])}" data-toggle="tooltip" data-original-title="{$ar['month']}月有{$ar['count']}篇文章">{$ar['month']}月</a>
        </foreach>
        </div>
    </div>
	
	<div class="sidebar-block" >
      <h2 class="title"><strong>{:color_txt('友情链接')}</strong></h2>
      <div style="text-align: center;">
      <foreach name='links' item='link'>
      <a target="_blank" href="{$link['link']}">{$link['name']}</a><br />
        </foreach>
        </div>
    </div>
<?php 
if(isset(F('webSet')['web_pet']) && !empty(F('webSet')['web_pet'])):?>
    <div class="sidebar-block">
      <h2 class="title"><strong>{:color_txt('我的宠物')}</strong></h2>
      <?php echo htmlspecialchars_decode(F('webSet')['web_pet']);?>
    </div>
  <?php endif;?>
  </aside>
  <!--/右侧>992px显示-->
  <footer class="footer"><p class='bq'>POWERED BY &copy;<a class="banquan" href="http://www.mengfan.club:9000" target="_blank">孟凡</a> &nbsp;|&nbsp; {:F('webSet')['webcopy']}&nbsp;|&nbsp; 浏览量：<span class="watch" style='display:inline;'>{:watch()}</span> &nbsp;|&nbsp; <a class="feed feed-xlweibo" href="{:U('__CONTROLLER__/getGitCommits')}">本站更新记录</a> &nbsp;|&nbsp; <span class="down" style='display:inline;cursor:pointer'>源码下载</span></p> </footer>
</section>
<div><a href="javascript:;" class="gotop" style="display:none;"></a></div> 
<!--/返回顶部--> 
<?php echo htmlspecialchars_decode(F('webSet')['web_count']);?>
<script src="__PUBLIC__/static/home/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/static/layer/layer.js"></script>
<script src="__PUBLIC__/static/home/js/nprogress.js" type="text/javascript" ></script> 
<script src="__PUBLIC__/static/home/js/bootstrap.min.js" type="text/javascript"></script> 
<script src="__PUBLIC__/static/home/js/common.js" type="text/javascript"></script> 
<script type="text/javascript" src='__PUBLIC__/static/home/js/jquery.cookie.js'></script>
<?php if(F('webSet')['miku']==1):?>
<script src="__PUBLIC__/static/home/miku/miku.js" type="text/javascript"></script> 
<script src="__PUBLIC__/static/home/miku/chat.js" type="text/javascript"></script> 
<script type="text/javascript">
  var isindex=<?php echo $isIndex;?>;
  var title='<?php echo $at;?>';
  var visitor="屌丝";
</script>
<?php endif;?>
<block name='js'></block>
</body>
</html>
  <script>
      if(sessionStorage.count){
          $('.watch').text(sessionStorage.count++);
      }else{
          sessionStorage.count=$('.watch').text();
          
      }
	  $('.down').click(function(){
	  layer.open({
  type: 2,
  title: '源码下载',
  shadeClose: true,
  shade: 0.8,
  area: ['420px', '240px'],
  content: ["{:U('index/down')}",'no'] //iframe的url
}); 
	  })
	  
                       $('#search').keyup(function(){
tit=$.trim($("#titleInput").val());
if(tit!=''){
data={
'title':tit
}

$.ajax({
type: "post",
url: "{:U('index/articless')}",
data: data,
async: true,
dataType: "json",
success: function(data){
var html=''
for(var i=0;i<data.length;i++){
    html+='<p>'+data[i]['title']+'</p>';
}
    $('#wrap').empty().append(html);
}
});
}

})
</script>